@extends('layouts.admin')

@section('title', '添加产品')

@section('content')
    <div class="container">
        {!! Form::open(array('route' => 'admin.product.store', 'files'=> true)) !!}
        <div class="form-group">
            {!! Form::text('title',Input::old('title'),['class'=>'form-control', 'placeholder' => 'What is your title?']) !!}
        </div>
        <div class="form-group">
            {!! Form::label('image', 'Your Image') !!}
            {!! Form::file('image') !!}
            <p class="help-block">Hey! Please don't upload over 15MB images!</p>
        </div>
        <div class="form-group">
            {!! Form::label('category_id', '产品分类') !!}
            {!! Form::select('category_id', $categories, null,['class'=>'form-control', 'placeholder' => 'Your caption', 'required' => '']); !!}
            <p class="help-block">Hey! Please don't upload over 15MB images!</p>
        </div>
        <div class="form-group">
            {!! Form::label('description', 'Don\'t miss to caption!') !!}
            {!! Form::text('description',Input::old('caption'),['class'=>'form-control', 'placeholder' => 'Your caption']) !!}
        </div>
        {!! Form::submit('上传',['class'=>'btn btn-info']) !!}
        {!!Form::close() !!}
    </div>
@stop